﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace BookStore.Solution.Presentation
{
    public partial class FrmSearchBillByDay : DevComponents.DotNetBar.OfficeForm
    {
        public FrmSearchBillByDay()
        {
            InitializeComponent();
        }
        public DateTime datetime { get; set; }
        private void btnSearchBillByDay_Click(object sender, EventArgs e)
        {
            if (checkValidation())
            {
                datetime = dtDay.Value;
                Close();
            }
        }
        private bool checkValidation()
        {
            if (dtDay.Value.Year < 1990)
            {
                MessageBox.Show("Năm nhập vào phải lớn hơn 1990", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            return true;
        }
        private void FrmSearchBillByDay_Load(object sender, EventArgs e)
        {
        }
    }
}